package com.ssm.service;

import com.ssm.dao.RoomMapper;
import com.ssm.pojo.Room;

import java.util.ArrayList;
import java.util.List;

public class RoomServiceImpl implements RoomService{
    private RoomMapper roomMapper;

    public void setRoomMapper(RoomMapper roomMapper) {
        this.roomMapper = roomMapper;
    }

    @Override
    public int addRoom(Room room) {
        return roomMapper.addRoom(room);
    }

    @Override
    public int updateRoom(Room room) {
        return roomMapper.updateRoom(room);
    }

    @Override
    public int deleteRoom(int dormId) {
        return roomMapper.deleteRoom(dormId);
    }

    @Override
    public List queryAllRoom() {
        return roomMapper.queryAllRoom();
    }

    @Override
    public Room queryRoomByID(int roomId) {
        return roomMapper.queryRoomByID(roomId);
    }


    @Override
    public int updateRoomByRoomId(Room room) {
       return roomMapper.updateRoomByRoomId(room);
    }
}
